Release 10.1A: OpenEdge Development:
Internationalizing Applications
Code-page conversion table
The following example shows the format of the code-page conversion table:
The
CONVERTkeyword signals the beginning of a code-page conversion table entry. TheNOINVERSEoption ofCONVERTtells OpenEdge not to create the table for the inverse conversion. IfNOINVERSEdoes not appear, OpenEdge automatically creates the table for the inverse conversion.NOINVERSEis useful for one-way conversions such as character sets for terminals and printers. TheSOURCE-NAMEkeyword precedes the name of the source code page. TheTARGET-NAMEkeyword specifies the name of the target code page. TheTYPEstatement specifies a conversion algorithm. For a conversion between two single-byte code pages, setTYPEto 1.To build a table to convert between two single-byte code pages, provide 256 values in 16 rows of 16 values. Be sure to format the rows of data exactly as shown.
The
ENDTABLEkeyword signals the end of the code-page conversion table. TheENDCONVERTkeyword signals the end of the table entry.To convert a character from one code page to another, OpenEdge looks in the code-page conversion table for the cell corresponding to the character’s numeric value in the source code page. The cell contains the numeric value of the character in the target code page.
For example, consider converting the character “ä” from ISO8859-1 to IBM850. In ISO8859-1, “ä” has the value 228. The following example shows part of the ISO 8859-1 to IBM850 conversion table. To perform the conversion, OpenEdge looks in the table for cell 228 and finds the value 132. This value represents the numeric value of “ä” in IBM850:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |